// 海洋数据请求
// import qs from 'qs'

import { request } from './request'

// 获取所有海洋数据
export function getOcean () {
  return request({
    url: '/api/list/ocean'
  })
}

// 根据海洋 id 获取相关数据
export function getOceanById (ocean_id) {
  return request({
    url: '/api/list/ocean/' + ocean_id
  })
}

// 新增海洋数据
export function addOcean (oceanData) {
  return request({
    url: '/admin/ocean/add',
    method: 'post',
    headers: {"Content-Type": "multipart/form-data"},
    data: oceanData
  })
}

// 修改海洋数据
export function updateOcean (oceanData) {
  return request({
    url: '/admin/ocean/update',
    method: 'post',
    headers:{'Content-Type':'multipart/form-data'},
    data: oceanData
  })
} 

// 删除海洋数据
export function deleteOcean (ocean_id) {
  return request({
    url: '/admin/ocean/delete/' + ocean_id,
    method: 'post'
  })
}
